package uml.behavioral.state;

/**
 * 状态--抽象状态类<br>
 * on 2023/1/6 0:15
 */
public abstract class AccountState {
    protected Account acc;

    public abstract void withdraw(double amount);

    public abstract void deposit(double amount);

    public abstract void computeInterest();

    public abstract void stateCheck();

    public AccountState(Account acc) {
        this.acc = acc;
        this.acc.setState(this);
    }

    public AccountState(AccountState state) {
        this.acc = state.acc;
    }
}
